import {Injectable, OnInit} from '@angular/core';
import {Http, Response} from '@angular/http';
@Injectable()
export class SecondkillGoodsService implements OnInit {
  _url = 'http://localhost:3000/goods/';
  constructor(private http: Http) {}
  ngOnInit() {}
  getSeckillGoods () {
    return this.http.get(this._url + 'goodslist')
      .map(
        (response: Response) => {
          const data = response.json();
          return data;
        }
      );
  }
}
